/*
 * @Author: doing
 * @Date: 2023-09-17 11:07:54
 * @LastEditors: git config user.name && git config user.email
 * @LastEditTime: 2023-09-24 14:40:47
 * @FilePath: \水果新鲜识别项目\fruit-recognition-backend\app\controller\home.js
 * @Description: 
 * 主页controller
 * Copyright (c) 2023 by 1540265624@qq.com, All Rights Reserved. 
 */
"use strict";

const BaseController = require("./base");
// const getUserTotal = require("../../dto/home.dto");
class HomeController extends BaseController {
  /**
   * @description 主页展示页面
   * @method GET
   * @author doing
   */
  async getUserTotal() {
    try {
      //前往service层进行数据库的操作
      const res = await this.service.home.getUerTotal();
      if (!res.success) throw res.msg;

      await this.success(res.data);
    } catch (err) {
      await this.error(err);
    }
  }

}

module.exports = HomeController;
